/*
 * QAgent.h
 *
 *  Created on: 6 mei 2013
 *      Author: Wietse
 */

#ifndef SOLOQAGENT_H_
#define SOLOQAGENT_H_
#include "../Definitions.h"
#include "../Definitions.h"
#ifdef SOLO_AGENT

#include <vector>
#include "../Data.h"
#include "../Position.h"
#include "../Crawler.h"

class Swarm;

// Struct that saves the ID of a vehicle, the angle and range
struct VehicleData
{
	int 		ID;
	Position	position;
	double		angle;
	double		range;
};

class QAgent {
private:
	void						getData(Swarm*, Position*, std::vector<Data>*);	//Gets the quadcopter positions from data vector and the positions from the crawlers that are nearby
	bool 						inRange(Position*);

	std::vector<VehicleData> 	quadcopters;
	std::vector<VehicleData> 	crawlers;
	int							targetID;
	Position 					target;
	double						decisionTimer;
public:
				QAgent();
				QAgent(Position*);
	virtual 	~QAgent();
	Position 	calculateTarget(Swarm*, Position*, std::vector<Data> *, double);	//Calculates the position the Quadcopter needs to move towards. This function implements the agent.

};
#endif
#endif /* QAGENT_H_ */
